/*!
\copyright  Copyright (c) 2021 - 2023 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file
\brief      Private header for the application state machine
*/

#ifndef USB_DONGLE_SM_PRIVATE_H
#define USB_DONGLE_SM_PRIVATE_H

#include "voice_sources_list.h"

/* Delay in ms before we rescan audio inputs,
 * usually following changes in the USB audio interface */
#define USB_DONGLE_SM_RESCAN_INPUTS_DELAY   (50)

#if defined(INCLUDE_SOURCE_APP_BREDR_AUDIO)
#define usbDongle_GetCurrentVoiceSource()   (voice_source_hfp_1)
#define UsbDongle_IsCallActive()            (hfp_data.state == APP_HFP_STATE_INCOMING)
#define UsbDongle_IncomingVoiceCall()       UsbDongle_HfpIncomingVoiceCall()
#elif defined(INCLUDE_SOURCE_APP_LE_AUDIO)
#define usbDongle_GetCurrentVoiceSource()   (voice_source_le_audio_unicast)
#define UsbDongle_IsCallActive()            (le_voice_data.state == APP_LE_VOICE_STATE_INCOMING)
#define UsbDongle_IncomingVoiceCall()       UsbDongle_LeVoiceIncomingCall()
#endif

/*! \brief Application state machine internal message IDs */
enum sm_internal_message_ids
{
    SM_INTERNAL_DELETE_PAIRED_DEVICES,  /*!< Delete all paired devices */
    SM_INTERNAL_FACTORY_RESET,          /*!< Reset device to factory defaults */
    SM_INTERNAL_PAIRING_ACL_COMPLETE,   /*!< Internal pairing ACL done/failed */
    SM_INTERNAL_RESCAN_AUDIO_INPUTS,    /*!< Rescan audio inputs */
    SM_INTERNAL_GAMING_MODE_TOGGLE,     /*!< Toggle gaming (low latency) mode */

#ifdef INCLUDE_LE_AUDIO_BROADCAST_SOURCE
    SM_INTERNAL_BROADCAST_MODE_TOGGLE,  /*!< Toggle broadcast mode. ie, broadcast or unicast */
#endif /* INCLUDE_LE_AUDIO_BROADCAST_SOURCE */
};

#endif // USB_DONGLE_SM_PRIVATE_H
